import { WindowAction } from '@/type';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const ipcRender = (window as any).sendToMain;

export default function useIpcSend() {
    return (type: WindowAction, args: unknown = false) => {
        return ipcRender.action(type, args);
    };
}
